package Lianxi;

public class Book {
    String bookName;
    int totalPages;
    public void definition(){
        this.bookName=bookName;
    }
    public void definition1(){
        this.totalPages=totalPages;
    }
    public void details(){
        this.bookName="查理九世";
        this.totalPages=100;
        if(totalPages>=200){
            this.totalPages=totalPages;
        }else{
            System.out.println("错误信息");
            totalPages=200;
        }
        System.out.println("书名："+bookName+"\t页数："+totalPages);
    }

    public static void main(String[] args) {
        Book gm=new Book();
        gm.details();
    }
}
